<template>
    <div>
        <div class="list-wrap">
    <vo-pages :data="ListData"
                @pullingUp="pullingUp"
                @pullingDown="pullingDown"
                :loadedAll="loadedAll">
        <ul class="article-list">
            <li class="article"
            v-for="article in ListData"
            :key="article.id">
            <div class="left">
            <img v-lazy='imageUrl'
                alt="thumb" />
            </div>
            <div class="right" >
            <!-- <router-link :to="'/Adata/' +  article.id">{{ article.title }}</router-link> -->
            <p @click="chuancan(article)" style="font-weight:bold">{{ article.title }}</p>
            <p class="more-info">
                <span class="author"></span>
                <span class="time">时间：2020-2-12</span>
            </p>
            </div>
        </li>
        </ul>
    </vo-pages>
    </div>
    </div>
</template>
<script>
import 'vo-pages/lib/vo-pages.css'
import VoPages from 'vo-pages'
export default {
    props: {
        ListData: Array,
    },
    components: {
VoPages
    },
    data() {
        return {

        loading: false,
        finished: false,
        total: 0,
        page: 1,
        loadedAll: false,
        imageUrl: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3642481453,1486938825&fm=26&gp=0.jpg'
        }
    },
    created() {

    },
    methods: {

          pullingDown () {
            this.beforePullDown = false
            this.page = 1
        },
    pullingUp () {
            this.page += 1
    },
    }
}
</script>
<style lang="scss" scoped>
p{
  margin-block-start: 0;
  margin-block-end: 0;
}
.container{
  height: 100%;
  width: 100%;
  background: #f5f5f5;
  .list-wrap{
    height: calc(100% - 50px);
    overflow-y: hidden;
  }
}

.article-list {
  width: 100%;
  height: auto;
  box-sizing: border-box;
  padding: 15px 15px 0;
  .article {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 15px;
    box-sizing: border-box;
    background: #FFF;
    border-radius: 5px;
    box-shadow: 0 0 6px #e3e3e3;
    .left {
      display: flex;
      justify-content: center;
      align-items: center;
      img {
        width: 80px;
        height: 80px;
        border-radius: 50%;
      }
    }
    .right {
      padding-left: 15px;
      box-sizing: border-box;
      display: flex;
      width: 235px;
      height: 80px;
      flex-direction: column;
      align-items: flex-start;
      justify-content: space-around;
      p {
        width: 100%;
        line-height: 20px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 16px;
      }
      .more-info{
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 14px;
        color: #666;
      }
    }
  }
}

</style>
